<!--#include file="appInit.aspx" -->
<script runat="server">
  protected void Page_Load(object sender,EventArgs e)
  {
      // 检查验证码
      string usrValidCode = My.Convert.ToString( Request.Form["MyValidateCode"] ).Trim().ToLower();
      string sysValidCode = My.Convert.ToString( Session["MyValidateCode"]).Trim().ToLower();
			
			if( string.IsNullOrEmpty(usrValidCode) ){
					Response.Write("{'error':'请输入验证码!'}");return;   
			}
      if( usrValidCode != sysValidCode){   
      		Response.Write("{'error':'验证码错误!'}");return;   
      }

      // 执行并返回
      NameValueCollection query = new NameValueCollection(Request.QueryString);//cmd=blog/cat/detail&catId=4&id=14
      if( null!=query )
          lblExecuteResult.Text = app.GetView(query);

      //将验证码过期
      Session["MyValidateCode"] = null;
  }
</script>
<asp:literal runat="server" id="lblExecuteResult" />